var express = require('express');

// 创建当前级路由
var mainRouter = express.Router();

// 引入下一级路由
var indexRouter = require('./index')
var loginRouter = require('./login')
var registerRouter = require('./register')
var afterRegisterRouter = require('./afterRegister')
var myhomeRouter = require('./myhome')
var submitRouter = require('./submitItem')

// 路由到下一级
mainRouter.use(['/index', '/'], indexRouter)
mainRouter.use('/login', loginRouter)
mainRouter.use('/register', registerRouter)
mainRouter.use('/afterRegister', afterRegisterRouter)
mainRouter.use('/myhome', myhomeRouter)
mainRouter.use('/submitItem', submitRouter)

// 暴露当前级路由
module.exports = mainRouter